// 常量路由
export const constantRoute = [
    {
        // 登录
        path: "/login",
        component: () => import("@/views/login/index.vue"),
        name: "login",
        meta: {
            title: "登录",
            hidden: true, //需不需要隐藏
            icon: "Avatar",
        },
    },
    {
        // 首页
        path: "/",
        component: () => import("@/layout/index.vue"),
        name: "layout",
        redirect: "/home",
        meta: {
            title: "layout",
            hidden: false,
            icon: "Operation",
        },
        children: [
            {
                path: "/home",
                component: () => import("@/views/home/index.vue"),
                name: "home",
                meta: {
                    title: "首页",
                    hidden: false,
                    icon: "HomeFilled",
                },
            },
        ],
    },
    {
        // 数据大屏
        path: "/screen",
        component: () => import("@/views/screen/index.vue"),
        name: "screen",
        meta: {
            title: "数据大屏",
            hidden: false,
            icon: "Monitor",
        },
    },
    {
        // 权限管理
        path: "/auth",
        component: () => import("@/layout/index.vue"),
        name: "auth",
        meta: {
            title: "权限管理",
            hidden: false,
            icon: "Lock",
        },
        children: [
            {
                path: "/auth/user",
                component: () => import("@/views/auth/user/index.vue"),
                name: "user",
                meta: {
                    title: "用户管理",
                    hidden: false,
                    icon: "User",
                },
            },
            {
                path: "/auth/role",
                component: () => import("@/views/auth/role/index.vue"),
                name: "role",
                meta: {
                    title: "角色管理",
                    hidden: false,
                    icon: "Avatar",
                },
            },
            {
                path: "/auth/menu",
                component: () => import("@/views/auth/menu/index.vue"),
                name: "menu",
                meta: {
                    title: "菜单管理",
                    hidden: false,
                    icon: "Tickets",
                },
            },
        ],
    },
    {
        // 商品管理
        path: "/product",
        component: () => import("@/layout/index.vue"),
        name: "product",
        meta: {
            title: "商品管理",
            hidden: false,
            icon: "Box",
        },
        children: [
            {
                path: "/product/brand",
                component: () => import("@/views/product/brand/index.vue"),
                name: "brand",
                meta: {
                    title: "品牌管理",
                    hidden: false,
                    icon: "Postcard",
                },
            },
            {
                path: "/product/attr",
                component: () => import("@/views/product/attr/index.vue"),
                name: "attr",
                meta: {
                    title: "属性管理",
                    hidden: false,
                    icon: "Discount",
                },
            },
            {
                path: "/product/spu",
                component: () => import("@/views/product/spu/index.vue"),
                name: "spu",
                meta: {
                    title: "spu管理",
                    hidden: false,
                    icon: "Compass",
                },
            },
            {
                path: "/product/sku",
                component: () => import("@/views/product/sku/index.vue"),
                name: "sku",
                meta: {
                    title: "sku管理",
                    hidden: false,
                    icon: "Remove",
                },
            },
            {
                path: "/product/oss",
                component: () => import("@/views/product/oss/index.vue"),
                name: "oss",
                meta: {
                    title: "oss上传下载",
                    hidden: false,
                    icon: "Sort",
                },
            },
            {
                path: "/product/selectTree",
                component: () => import("@/views/product/selecttree/index.vue"),
                name: "oss",
                meta: {
                    title: "selectTree",
                    hidden: false,
                    icon: "Sort",
                },
            },
        ],
    },
    {
        // 404
        path: "/404",
        component: () => import("@/views/404/index.vue"),
        name: "404",
        meta: {
            title: "404",
            hidden: true,
            icon: "Close",
        },
    },
    {
        // 不存在的
        path: "/:pathMatch(.*)*",
        redirect: "/404",
        name: "any",
        meta: {
            title: "任意路由",
            hidden: true,
            icon: "Notification",
        },
    },
]
